#include <windows.h>
#include <d3d9.h>

class TD3DWindow
{
public :
	TD3DWindow();		

	HRESULT Create(HWND TargetWindow);	// Please call this function after window creation
	HRESULT Destroy();					// Call this function in WM_DESTROY handler

	HRESULT Render();					// WM_PAINT...
	HRESULT ScreenShotToTGA(TCHAR* FileName);		// Save current sceeenshot to TGA file

protected :
	LPDIRECT3D9				pD3D;
	LPDIRECT3DDEVICE9		pD3DDevice;
	LPDIRECT3DVERTEXBUFFER9 pVB;
};